﻿// MT581




using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category5
{
  public class MT581 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagDefinition U0011;
    private static SwiftTagSubItemDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagSubItemDefinition U0014;
    private static SwiftTagDefinition U0015;
    private static SwiftTagDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagDefinition U0019;

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT581.U0002);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Related Reference")]
    public Tag21 RelatedReference_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT581.U0004);
      }
    }

    [Description("Related Reference")]
    public Tag21 Tag21_RelatedReference
    {
      get
      {
        return this.RelatedReference_21;
      }
    }

    [Description("Further Identification")]
    public Tag23 FurtherIdentification_23
    {
      get
      {
        return new Tag23((SwiftElement) this, 0, (SwiftDefinitionElement) MT581.U0006);
      }
    }

    [Description("Further Identification")]
    public Tag23 Tag23_FurtherIdentification
    {
      get
      {
        return this.FurtherIdentification_23;
      }
    }

    [Description("Date Of Adjustment")]
    public Tag30 DateOfAdjustment_30
    {
      get
      {
        return new Tag30((SwiftElement) this, 0, (SwiftDefinitionElement) MT581.U0008);
      }
    }

    [Description("Date Of Adjustment")]
    public Tag30 Tag30_DateOfAdjustment
    {
      get
      {
        return this.DateOfAdjustment_30;
      }
    }

    [Description("Adjustment To The Collateral")]
    public Tag35H AdjustmentToTheCollateral_35H
    {
      get
      {
        return new Tag35H((SwiftElement) this, 0, (SwiftDefinitionElement) MT581.U000F);
      }
    }

    [Description("Adjustment To The Collateral")]
    public Tag35H Tag35H_AdjustmentToTheCollateral
    {
      get
      {
        return this.AdjustmentToTheCollateral_35H;
      }
    }

    [Description("Identification Of Securities Used As Collateral")]
    public Tag35B IdentificationOfSecuritiesUsedAsCollateral_35B
    {
      get
      {
        return new Tag35B((SwiftElement) this, 0, (SwiftDefinitionElement) MT581.U0011);
      }
    }

    [Description("Identification Of Securities Used As Collateral")]
    public Tag35B Tag35B_IdentificationOfSecuritiesUsedAsCollateral
    {
      get
      {
        return this.IdentificationOfSecuritiesUsedAsCollateral_35B;
      }
    }

    [Description("Reason For Collateral Adjustment")]
    public Tag80C ReasonForCollateralAdjustment_80C
    {
      get
      {
        return new Tag80C((SwiftElement) this, 0, (SwiftDefinitionElement) MT581.U0015);
      }
    }

    [Description("Reason For Collateral Adjustment")]
    public Tag80C Tag80C_ReasonForCollateralAdjustment
    {
      get
      {
        return this.ReasonForCollateralAdjustment_80C;
      }
    }

    [Description("Outstanding Collateral Value")]
    public Tag34B OutstandingCollateralValue_34B
    {
      get
      {
        return new Tag34B((SwiftElement) this, 0, (SwiftDefinitionElement) MT581.U0016);
      }
    }

    [Description("Outstanding Collateral Value")]
    public Tag34B Tag34B_OutstandingCollateralValue
    {
      get
      {
        return this.OutstandingCollateralValue_34B;
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 SenderToReceiverInformation_72
    {
      get
      {
        return new Tag72((SwiftElement) this, 0, (SwiftDefinitionElement) MT581.U0019);
      }
    }

    [Description("Sender To Receiver Information")]
    public Tag72 Tag72_SenderToReceiverInformation
    {
      get
      {
        return this.SenderToReceiverInformation_72;
      }
    }

    public MT581()
      : base(true)
    {
    }

    public MT581(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT581.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT581.MessageDefinition = new SwiftMessageDefinition("MT581", "Collateral Adjustment Message");
      MT581.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT581.U0002.TagName = ":20:";
      MT581.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT581.U0002.Elements.Add((SwiftDefinitionElement) MT581.U0003);
      MT581.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT581.U0002);
      MT581.U0004 = new SwiftTagDefinition("RelatedReference_21", "Related Reference");
      MT581.U0004.TagName = ":21:";
      MT581.U0005 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT581.U0004.Elements.Add((SwiftDefinitionElement) MT581.U0005);
      MT581.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT581.U0004);
      MT581.U0006 = new SwiftTagDefinition("FurtherIdentification_23", "Further Identification");
      MT581.U0006.TagName = ":23:";
      MT581.U0007 = new SwiftTagSubItemDefinition("FurtherIdentification", "Further Identification");
      MT581.U0006.Elements.Add((SwiftDefinitionElement) MT581.U0007);
      MT581.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT581.U0006);
      MT581.U0008 = new SwiftTagDefinition("DateOfAdjustment_30", "Date Of Adjustment");
      MT581.U0008.TagName = ":30:";
      MT581.U0008.Mandatory = false;
      MT581.U000E = new SwiftTagSubItemDefinition("Date", "Date");
      MT581.U0008.Elements.Add((SwiftDefinitionElement) MT581.U000E);
      MT581.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT581.U0008);
      MT581.U000F = new SwiftTagDefinition("AdjustmentToTheCollateral_35H", "Adjustment To The Collateral");
      MT581.U000F.TagName = ":35H:";
      MT581.U0010 = new SwiftTagSubItemDefinition("SignCurrencyQuantity", "Sign, Currency and Quantity");
      MT581.U000F.Elements.Add((SwiftDefinitionElement) MT581.U0010);
      MT581.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT581.U000F);
      MT581.U0011 = new SwiftTagDefinition("IdentificationOfSecuritiesUsedAsCollateral_35B", "Identification Of Securities Used As Collateral");
      MT581.U0011.TagName = ":35B:";
      MT581.U0011.Mandatory = false;
      MT581.U0012 = new SwiftTagSubItemDefinition("IdentificationOfSecurity", "Identification Of Security");
      MT581.U0012.Mandatory = false;
      MT581.U0013 = new SwiftTagSubItemDefinition("IdentificationofSecurity", "Identification of Security");
      MT581.U0012.Elements.Add((SwiftDefinitionElement) MT581.U0013);
      MT581.U0011.Elements.Add((SwiftDefinitionElement) MT581.U0012);
      MT581.U0014 = new SwiftTagSubItemDefinition("DescriptionOfSecurity", "Description Of Security");
      MT581.U0014.Mandatory = false;
      MT581.U0011.Elements.Add((SwiftDefinitionElement) MT581.U0014);
      MT581.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT581.U0011);
      MT581.U0015 = new SwiftTagDefinition("ReasonForCollateralAdjustment_80C", "Reason For Collateral Adjustment");
      MT581.U0015.TagName = ":80C:";
      MT581.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT581.U0015);
      MT581.U0016 = new SwiftTagDefinition("OutstandingCollateralValue_34B", "Outstanding Collateral Value");
      MT581.U0016.TagName = ":34B:";
      MT581.U0016.Mandatory = false;
      MT581.U0017 = new SwiftTagSubItemDefinition("Currency", "Currency");
      MT581.U0016.Elements.Add((SwiftDefinitionElement) MT581.U0017);
      MT581.U0018 = new SwiftTagSubItemDefinition("Amount", "Amount");
      MT581.U0016.Elements.Add((SwiftDefinitionElement) MT581.U0018);
      MT581.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT581.U0016);
      MT581.U0019 = new SwiftTagDefinition("SenderToReceiverInformation_72", "Sender To Receiver Information");
      MT581.U0019.TagName = ":72:";
      MT581.U0019.Mandatory = false;
      MT581.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT581.U0019);
    }
  }
}
